package org.anjan.dp.strategy.impl.ducks;

import org.anjan.dp.strategy.Duck;
import org.anjan.dp.strategy.impl.fly.FlyWithWings;
import org.anjan.dp.strategy.impl.quack.Quack;

/**
 * Created by chebbaso on 12/4/14.
 */
public class MallardDuck extends Duck {
    public MallardDuck() {
        //Mallard duck uses the concrete implementations  to define its behavior.
        //Mallard inherits the quack and fly behavior instance variables from the Duck
        //TODO:WE are programming to the implementations directly.
        flyBehavior = new FlyWithWings();
        quackBehavior = new Quack();
    }

    @Override
    public void display() {
        System.out.println("Hello i am a mallard duck");
    }


}
